﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace MediatR
{

    public interface IRouteNotificationHandler<in TRouteNotification>
    where TRouteNotification : IRouteNotification
    {
        /// <summary>
        /// 设置路由
        /// </summary>
        string Route { get; }

        /// <summary>
        /// Handles a notification
        /// </summary>
        /// <param name="notification">The notification</param>
        /// <param name="cancellationToken">Cancellation token</param>
        Task Handle(TRouteNotification notification, CancellationToken cancellationToken);
    }
}
